 function feat = getPolyFeature(map,sz, way)
     if nargin <3,  way = 1; end     
    
     intim = cumsum(cumsum(map,1),2);
     sz2    =   size(intim);
     gridx  =   1:sz:sz2(2);   gridy  =  1:sz:sz2(1);
     gridv  =   intim(gridy(1:end-1),gridx(1:end-1));
     gridv1 =   intim(gridy(1:end-1),gridx(2:end));
     gridv2 =   intim(gridy(2:end),  gridx(1:end-1));
     gridv3 =   intim(gridy(2:end),  gridx(2:end));
     ff     =   gridv3 - gridv2 - gridv1 + gridv;
     
     if way ==1
         feat   =   ff >(sz*sz)/2;
     elseif way ==2
         feat   =   ff;
     end    